package com.huobiinfo.demo.service;

import com.huobiinfo.demo.mapper.NewsMapper;
import com.huobiinfo.demo.model.News;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author peter
 * @title: NewsServiceImpl
 * @projectName huobiinfo_webmagic_springboot
 * @description: TODO
 * @date 19-6-14下午4:54
 */
@Service
public class NewsServiceImpl implements NewsService {

    private NewsMapper newsMapper;

    @Autowired
    public void setNewsMapper(NewsMapper newsMapper) {
        this.newsMapper = newsMapper;
    }


    @Override
    public int insert(News news) {
        return newsMapper.insertSelective(news);
    }
}
